/*
 This file is part of BTStracker
		
    BTStracker is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    BTStracker is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Foobar.  If not, see <http://www.gnu.org/licenses/>.	
	author: azbest.pro (azbest.pro@gmail.com)
*/
package pl.vdl.azbest.swt;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;

import pl.vdl.azbest.mremote.gui.SWTElement;

public class SWTElementShell extends SWTElement {

	//private Shell sShell = null;  //  @jve:decl-index=0:visual-constraint="82,191"
	private Menu menuBar = null;
	private Menu submenu = null;

	/**
	 * This method initializes sShell
	 */
	protected void createSShell() {
		GridLayout gridLayout = new GridLayout();
		gridLayout.numColumns = 2;
		sShell = new Shell();
		sShell.setText("Shell");
		sShell.setLayout(gridLayout);
		sShell.setSize(new Point(391, 253));
		menuBar = new Menu(sShell, SWT.BAR);
		MenuItem submenuItem = new MenuItem(menuBar, SWT.CASCADE);
		submenuItem.setText("File");
		submenu = new Menu(submenuItem);
		MenuItem push = new MenuItem(submenu, SWT.PUSH);
		push.setText("Open");
		submenuItem.setMenu(submenu);
		sShell.setMenuBar(menuBar);
		init();
	}
	private void init(){
		Composite1 c1 = new Composite1(sShell,SWT.NONE);
		c1.setSize(new Point(80, 56));
		Composite2 c2 = new Composite2(sShell,SWT.NONE);
		c2.setSize(new Point(80, 56));
		WIN_TITLE ="Hello ";
		sShell.setText(WIN_TITLE);
		Composite3 c3 = new Composite3(sShell,SWT.NONE);
	
		
	}
	//starting using SWTElement
	public static void main(String[] args) {
		SWTElementShell swtes = new SWTElementShell();
		swtes.openSWTWidgetStandAlone2();
	}

}
